package org.example.curriculum_design_6_16.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName political_performance
 */
@TableName(value ="political_performance")
@Data
public class PoliticalPerformance implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private String studentId;

    /**
     * 
     */
    private String academicYear;

    /**
     * 
     */
    private Double baseScore;

    /**
     * 荣誉加分
     */
    private Double honorScore;

    /**
     * 导师组评价分
     */
    private Double advisorScore;

    /**
     * 扣分
     */
    private Double deduction;

    /**
     * 
     */
    private Double totalScore;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PoliticalPerformance other = (PoliticalPerformance) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStudentId() == null ? other.getStudentId() == null : this.getStudentId().equals(other.getStudentId()))
            && (this.getAcademicYear() == null ? other.getAcademicYear() == null : this.getAcademicYear().equals(other.getAcademicYear()))
            && (this.getBaseScore() == null ? other.getBaseScore() == null : this.getBaseScore().equals(other.getBaseScore()))
            && (this.getHonorScore() == null ? other.getHonorScore() == null : this.getHonorScore().equals(other.getHonorScore()))
            && (this.getAdvisorScore() == null ? other.getAdvisorScore() == null : this.getAdvisorScore().equals(other.getAdvisorScore()))
            && (this.getDeduction() == null ? other.getDeduction() == null : this.getDeduction().equals(other.getDeduction()))
            && (this.getTotalScore() == null ? other.getTotalScore() == null : this.getTotalScore().equals(other.getTotalScore()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStudentId() == null) ? 0 : getStudentId().hashCode());
        result = prime * result + ((getAcademicYear() == null) ? 0 : getAcademicYear().hashCode());
        result = prime * result + ((getBaseScore() == null) ? 0 : getBaseScore().hashCode());
        result = prime * result + ((getHonorScore() == null) ? 0 : getHonorScore().hashCode());
        result = prime * result + ((getAdvisorScore() == null) ? 0 : getAdvisorScore().hashCode());
        result = prime * result + ((getDeduction() == null) ? 0 : getDeduction().hashCode());
        result = prime * result + ((getTotalScore() == null) ? 0 : getTotalScore().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", studentId=").append(studentId);
        sb.append(", academicYear=").append(academicYear);
        sb.append(", baseScore=").append(baseScore);
        sb.append(", honorScore=").append(honorScore);
        sb.append(", advisorScore=").append(advisorScore);
        sb.append(", deduction=").append(deduction);
        sb.append(", totalScore=").append(totalScore);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}